import argcomplete
import importlib.metadata
from rich.console import Console

from mando import command, main, arg

console = Console()


def start():
    try:
        argcomplete.autocomplete(main.parser)
        main()
    except Exception:
        console.print_exception()
